using Admin.NET.Core;
using SqlSugar;

namespace Admin.NET.Application;

[SugarTable("Room", "房间")]
[SysTable]
public class Room : EntityTenant
{
	/// <summary>
	/// 区域id
	/// </summary>
	public long BuildingId { get; set; }

	/// <summary>
	/// 房间名称
	/// </summary>
	public string Name { get; set; }

	/// <summary>
	/// 面积
	/// </summary>
	public double Area { get; set; }

	/// <summary>
	/// 业主id
	/// </summary>
	public long? OwnerId { get; set; }

	/// <summary>
	/// 房间余额
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal Balance { get; set; }

	/// <summary>
	/// 房间余额预警规则
	/// </summary>
	public long? WarningRuleId { get; set; }

	/// <summary>
	/// 最近一次预警时的房间余额，当充值后，应当清空此值。此值用于判断是否已发送过预警信息
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? LatestWarningBalance { get; set; }

	/// <summary>
	/// 备注
	/// </summary>
	public string? Remark { get; set; }

	/// <summary>
	/// 限制缴费金额
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? LimitAmount { get; set; }
}
